(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

active(minus(0, Y)) → mark(0)
active(minus(s(X), s(Y))) → mark(minus(X, Y))
active(geq(X, 0)) → mark(true)
active(geq(0, s(Y))) → mark(false)
active(geq(s(X), s(Y))) → mark(geq(X, Y))
active(div(0, s(Y))) → mark(0)
active(div(s(X), s(Y))) → mark(if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(s(X)) → s(active(X))
active(div(X1, X2)) → div(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
s(mark(X)) → mark(s(X))
div(mark(X1), X2) → mark(div(X1, X2))
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
proper(minus(X1, X2)) → minus(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(geq(X1, X2)) → geq(proper(X1), proper(X2))
proper(true) → ok(true)
proper(false) → ok(false)
proper(div(X1, X2)) → div(proper(X1), proper(X2))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))
minus(ok(X1), ok(X2)) → ok(minus(X1, X2))
s(ok(X)) → ok(s(X))
geq(ok(X1), ok(X2)) → ok(geq(X1, X2))
div(ok(X1), ok(X2)) → ok(div(X1, X2))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Rewrite Strategy: INNERMOST

(1) NestedDefinedSymbolProof (BOTH BOUNDS(ID, ID) transformation)

The following defined symbols can occur below the 0th argument of top: proper, active
The following defined symbols can occur below the 0th argument of proper: proper, active
The following defined symbols can occur below the 0th argument of active: proper, active

Hence, the left-hand sides of the following rules are not basic-reachable and can be removed:
active(minus(0, Y)) → mark(0)
active(minus(s(X), s(Y))) → mark(minus(X, Y))
active(geq(X, 0)) → mark(true)
active(geq(0, s(Y))) → mark(false)
active(geq(s(X), s(Y))) → mark(geq(X, Y))
active(div(0, s(Y))) → mark(0)
active(div(s(X), s(Y))) → mark(if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0))
active(if(true, X, Y)) → mark(X)
active(if(false, X, Y)) → mark(Y)
active(s(X)) → s(active(X))
active(div(X1, X2)) → div(active(X1), X2)
active(if(X1, X2, X3)) → if(active(X1), X2, X3)
proper(minus(X1, X2)) → minus(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(geq(X1, X2)) → geq(proper(X1), proper(X2))
proper(div(X1, X2)) → div(proper(X1), proper(X2))
proper(if(X1, X2, X3)) → if(proper(X1), proper(X2), proper(X3))

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

div(mark(X1), X2) → mark(div(X1, X2))
proper(true) → ok(true)
top(ok(X)) → top(active(X))
minus(ok(X1), ok(X2)) → ok(minus(X1, X2))
div(ok(X1), ok(X2)) → ok(div(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))
proper(false) → ok(false)
proper(0) → ok(0)
if(mark(X1), X2, X3) → mark(if(X1, X2, X3))
if(ok(X1), ok(X2), ok(X3)) → ok(if(X1, X2, X3))
top(mark(X)) → top(proper(X))
geq(ok(X1), ok(X2)) → ok(geq(X1, X2))

Rewrite Strategy: INNERMOST

(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2, 3, 4, 5, 6, 7]
transitions:
mark0(0) → 0
true0() → 0
ok0(0) → 0
active0(0) → 0
false0() → 0
00() → 0
div0(0, 0) → 1
proper0(0) → 2
top0(0) → 3
minus0(0, 0) → 4
s0(0) → 5
if0(0, 0, 0) → 6
geq0(0, 0) → 7
div1(0, 0) → 8
mark1(8) → 1
true1() → 9
ok1(9) → 2
active1(0) → 10
top1(10) → 3
minus1(0, 0) → 11
ok1(11) → 4
div1(0, 0) → 12
ok1(12) → 1
s1(0) → 13
ok1(13) → 5
s1(0) → 14
mark1(14) → 5
false1() → 15
ok1(15) → 2
01() → 16
ok1(16) → 2
if1(0, 0, 0) → 17
mark1(17) → 6
if1(0, 0, 0) → 18
ok1(18) → 6
proper1(0) → 19
top1(19) → 3
geq1(0, 0) → 20
ok1(20) → 7
mark1(8) → 8
mark1(8) → 12
ok1(9) → 19
ok1(11) → 11
ok1(12) → 8
ok1(12) → 12
ok1(13) → 13
ok1(13) → 14
mark1(14) → 13
mark1(14) → 14
ok1(15) → 19
ok1(16) → 19
mark1(17) → 17
mark1(17) → 18
ok1(18) → 17
ok1(18) → 18
ok1(20) → 20
active2(9) → 21
top2(21) → 3
active2(15) → 21
active2(16) → 21

(4) BOUNDS(1, n^1)